Floating / Roaming Network License

This tutorial demonstrates how to implement USB License and protect your application with floating/roaming* network licenses. Specifically, you want to distribute your application as the full featured version with a USB License Key (dongle) in which you can control the number of concurrent users (including roaming users) within a network.

 

Based on the settings used in this tutorial, the following describes how the user would experience the protected application.

 

·         You distribute the application with a USB License Key (dongle), and the setup installer of NetKey License Server (NKLS).

·         The user (or administrator) must deploy the NKLS to a server, and then attach the provided USB License Key to the server.

·         When the NKLS is up and running, it is ready to allocate available licenses to the application running on the client computers.

·         The user can install and run the application on the client computers. On each client computer, it must be ensured to have the Network Key configuration file (NETKEY.INI) with the proper settings of the NKLS address and port number.

·         Optionally, the user can check out (or borrow) a network license from the server using the provided Roam utility. This allows the roaming user to disconnect from the network, and temporarily use the application off-site (e.g. for 15 days).

 

* The roaming license feature is included in ElecKey Ultimate edition and available by feature upgrade for other editions.

Protecting Applications

The following instructions use ElecKey Integrator (the shell protection method) to protect the application. The necessary settings are described below. However, you may change the options as you want.

 

Besides the shell protection method, you may also use the provided KeyCheck API (including the KeyCheck Class Library and the KeyCheck .NET Component) to protect your application, by specifying the same settings as described below. Please see Protecting Applications Using API and the provided code examples for more information.

To Protect an Application

1.       Run ElecKey Integrator. The wizard dialog box appears.

2.       In the Select Application License Type dialog, select USB License (Dongle).

3.       In the Select Integration Task dialog, select Protect Code and Enforce Licensing.

4.       In the Specify Protected Program dialog, specify your executable file name in the Original field. In the Target field, specify a different name for the protected executable file that will be created.

5.       In the Set Identification dialog, assign a Program ID in the Program ID field.

6.       In the Key Detection Method dialog, select Detect Network Key.

7.       In the Set Options dialog, you can use the default settings.

8.       In the Summary dialog, review the action you have chosen.

9.       Click the Integrate button. The protected version of your executable file is created.

 

It is recommended that you save your unprotected executable file in a safe place. You can then rename the protected version to its original file name, and use it further to create a setup package and distribute your application to the user.

Licensing Protected Applications

By implementing USB License, you can license the protected application by making the USB License Key (dongle) to be provided to the user. For floating network licensing, you can set the maximum number of allowed concurrent users in the USB License Key. The following instructions describe how to use USB LicenseKey Manager to make a USB License Keys.

 

Optionally, if roaming licenses are deployed, you must also use LicenseKey Manager to create the Roam utility (ROAM.EXE), which allows the user to check out (or borrow) a network license from the server. The Roam utility must be distributed with NetKey License Server.

To Make a USB License Keys

1.       Run USB LicenseKey Manager.

2.       Attach one or several blank USB drives (via a USB hub) to your computer.

3.       In the Main tab of the Key Properties pane, from the Program ID drop-down list, select Program ID of your application.

4.       From the Implementation drop-down list, select Distribution.

5.       Click the Network tab. In the Network Key box, specify the maximum number of concurrent users in the Max-User field, and then specify the network settings as you want. If you want to allow roaming licenses, specify the roaming period in the Max-Roam field.

6.       From the Package pane, you can save the settings as a package for future use. In the Package Name field, enter the title of the package. Then, from the File menu, click Save.

7.       From the Note pane, you can enter notes about the package in the Messages field. Then, from the File menu, click Save.

8.       Optionally, from the File menu, you can click Set Key Value to generate 10 random key-value pairs to be stored in the Key. The Key Value can be accessible if you protect your application using the KeyCheck API.

9.       Optionally, from the File menu, you can click Set Content Files to specify the folder that contains the content files of the application. All files will be copied to the USB License Key automatically during the making.

10.    From the Key Properties pane, click the Make Key button. The Make Key dialog box appears.

11.    In the Make Key dialog box, select the checkboxes of the drives you want to make the USB License Key. Then, click the Make button.

To Build the Roam Utility

1.       Run LicenseKey Manager.

2.       From the Tools menu, select Create Roam Utility. The dialog box appears.

3.       In the Exec File edit box, enter the full path to create the Roam utility.

4.       In the Program ID drop-down list, select the Program ID you previously used to protect your application.

5.       In the Default Dialog Box pane, you can customize the texts and labels for the Roam utility.

6.       Click the Create button. The Roam utility and configuration file (.INI) are created in the specified path.

Distributing Protected Applications

To create a setup package and distribute your application, please ensure to include the protected version of your executable file and the ElecKey system files. For Win32/Win64/.NET applications, the following is the list of the needed system files:

 

·         Ekc3220.dll (in \Deploy\Win32App\KeyCheck\)

·         Ekc6420.dll (in \Deploy\Win64App\KeyCheck\)

·         Nkag20.exe (in \Deploy\Win32App\Network\)

·         Nkag6420.exe (in \Deploy\Win64App\Network\)

·         Netkey.ini (Network Key configuration file)

The above system files must be placed in the same directory as the protected executable file. Note that the user must edit the Network Key configuration file (NETKEY.INI) with the proper settings of the NKLS address and port number. Depending on the features you have enabled, you may need additional system files. Please see Network License System Files for more details.

 

In addition, to allow the user to deploy the network license, you must also include the provided NetKey License Server (NKLS) setup installer:

 

·         NKLS Setup.exe (in \NetKeyLicenseServer\)

·         NKLS 4.0 EK.msi (optional) (in \NetKeyLicenseServer\)